/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.ipccenter.toster.jpa;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.*;

/**
 *
 * @author 7
 */
@Entity
@Table(name = "USER_SESSION")
@SequenceGenerator(name="seq", sequenceName="p1_seq")
public class JPASession implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="seq")
    @Column(name = "Session_id")
    private BigInteger session_id;
    
    @Column(name = "user_id")
    private BigInteger user_id;
    
    @Column(name = "suite_id")
    private BigInteger suite_id;
    
    @Column(name = "start_date")
    @Temporal( TemporalType.TIMESTAMP )
    private java.util.Date start_date;
    
    @Column(name = "end_time")
    @Temporal( TemporalType.TIMESTAMP )
    private java.util.Date end_date;
    

    public BigInteger getId() {
        return session_id;
    }

    public void setId(BigInteger id) {
        this.session_id = id;
    }

    public Date getEnd_date() {
        return end_date;
    }

    public Date getStart_date() {
        return start_date;
    }

    public BigInteger getSuit_id() {
        return suite_id;
    }

    public BigInteger getUser_id() {
        return user_id;
    }

    public void setEnd_date(Date end_date) {
        this.end_date = end_date;
    }

    public void setStart_date(Date start_date) {
        this.start_date = start_date;
    }

    public void setSuit_id(BigInteger suite_id) {
        this.suite_id = suite_id;
    }

    public void setUser_id(BigInteger user_id) {
        this.user_id = user_id;
    }

    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (session_id != null ? session_id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof JPASession)) {
            return false;
        }
        JPASession other = (JPASession) object;
        if ((this.session_id == null && other.session_id != null) || (this.session_id != null && !this.session_id.equals(other.session_id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.ipccenter.toster.jpa.JPASessions[ id=" + session_id + " ]";
    }
    
}
